/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package model;

/**
 *
 * @author Oscar
 */
public class ServerInfo {

    private String Name;
    private String Ip;
    private int Upload;
    private int Download;

    public ServerInfo(String name, String ip, int upload, int download) {
        this.Name = name;
        this.Ip = ip;
        this.Upload = upload;
        this.Download = download;
    }

    public ServerInfo(String ip, int upload, int download) {
        this.Ip = ip;
        this.Upload = upload;
        this.Download = download;
    }

    public ServerInfo(String name, String ip) {
        this.Name = name;
        this.Ip = ip;
    }

    public ServerInfo() {
    }

    /**
     * Convierte a JSON una instancia de la clase
     *
     * @return
     */
    public String toJson() {
            return "{ \"serverinfo\" [ \"name\": \"" + Name + "\"},"
                    + " \"ip\": \"" + Ip + "\"] }";
    }

    /**
     * Convierte a String una instancia de la clase
     *
     * @return
     */
    @Override
    public String toString() {
            return "serverinfo [name = " + Name + ","
                    + " ip = " + Ip + "]";
    }

    public String getName() {
            return Name;
    }

    public void setName(String name) {
            this.Name = name;
    }

    public String getIp() {
            return Ip;
    }

    public void setIp(String ip) {
            this.Ip = ip;
    }

    public int getDownload() {
        return Download;
    }

    public void setDownload(int Download) {
        this.Download = Download;
    }

    public int getUpload() {
        return Upload;
    }

    public void setUpload(int Upload) {
        this.Upload = Upload;
    }

}
